package obeseve;

import java.util.Vector;
import user.model.UserModel;
import user.ucm.UCGetAirline;
import user.ucm.UCGetPay;
import user.view.MainView;

public class Obeserver {
    private MainView mv;
    private Vector v;

    public Obeserver(MainView mv){
        this.mv = mv;
    }

    public void run(UserModel um){
        UCGetAirline ucga = new UCGetAirline();
            if ((v = ucga.run()) != null) {
                this.mv.getAirVModel().getAirplane_List().setListData(v);
            } else {
                //this.mv.getAirVModel().genote_Label.setText("No valuable data!");
            }
            UCGetPay ucgp = new UCGetPay(um);
            if((v=ucgp.run())!=null){
                this.mv.getAirVModel().getReserve_List().setListData(v);
            } else {

            }

    }
}
